package com.cn.serverline.lineicp.productionLine.param;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 * 零组件新增参数
 *
 * @author Gmr
 * @since 2024/7/30
 */
@Data
public class ProcessSchemeAddParam {

	/**
	 * 名称
	 */
	@ApiModelProperty(value = "名称", required = true)
	@NotBlank(message = "名称不能为空")
	@Size(max = 50, message = "名称长度不能超过50")
	private String name;

	/**
	 * 父ID
	 */
	@ApiModelProperty(value = "父ID", required = true)
	@JsonSerialize(using= ToStringSerializer.class)
	@NotNull(message = "父ID不能为空")
	private Long parentId;

	/**
	 * 工艺阶段(0.总装,1.部装)
	 */
	@ApiModelProperty(value = "工艺阶段(0.总装,1.部装)", required = true)
	@NotNull(message = "工艺阶段不能为空")
	private Long processStage;

	/**
	 * 零组件代号
	 */
	@ApiModelProperty(value = "零组件代号", required = true)
	@NotBlank(message = "零组件代号不能为空")
	@Size(max = 50, message = "零组件代号长度不能超过50")
	private String componentCode;

	/**
	 * 主制分厂
	 */
	@ApiModelProperty(value = "主机制分厂")
	private String mainManufacturingPlant;

	/**
	 * 阶段标记
	 */
	@ApiModelProperty(value = "阶段标记", required = true)
	@NotBlank(message = "阶段标记不能为空")
	private String stageMarking;

	/**
	 * 版次
	 */
	@ApiModelProperty(value = "版次", required = true)
	@NotBlank(message = "版次不能为空")
	private String edition;
}
